package com.qpx.eurekajpa.service;

import com.qpx.dto.LogDto;
import com.qpx.vo.ResultEntity;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Service;

@Service
public class LogServiceImpl implements FallbackFactory {
    @Override
    public Object create(Throwable throwable) {
        throwable.printStackTrace();
        return new LogService() {
            @Override
            public ResultEntity save(LogDto logDto) {
                return ResultEntity.error("500","保存日志异常",null);
            }
        };
    }
}
